<template>
  <div class="BodyCellComp" @click="handleClick">
    <button @click.stop="$emit('body-click', index, value, prop, row, column)">
      {{ value + ':' + index }}
    </button>
  </div>
</template>

<script>
export default {
  name: 'BodyCellComp',
  props: {
    // 列索引值
    index: {
      type: Number,
    },
    // 列字段名
    prop: {
      type: String,
    },
    // 值
    value: {},
    // 列定义
    column: {
      type: Object,
    },
    // 列定义
    row: {
      type: Object,
    },
  },
  methods: {
    handleClick() {
      console.log('BodyCellComp:', this.$props)
    },
  },
  created() {
    console.log('BodyCellComp: created')
  },
}
</script>

<style scoped>
.BodyCellComp {
  border: 1px solid red;
}
</style>
